package cn.zn.modules.expense.service.impl;

import cn.hutool.core.util.StrUtil;
import cn.zn.modules.report.vo.ReportCashierVo;
import cn.zn.framework.common.utils.PageUtils;
import cn.zn.modules.expense.dao.TpMainDao;
import cn.zn.modules.expense.entity.TpAttachmentEntity;
import cn.zn.modules.expense.entity.TpMainEntity;
import cn.zn.modules.expense.service.TpMainService;
import cn.zn.modules.expense.vo.*;
import cn.zn.modules.pz.enums.*;
import cn.zn.modules.signature.entity.HtmlsignatureEntity;
import cn.zn.modules.signature.service.HtmlsignatureService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;


@Service("tpMainService")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class TpMainServiceImpl extends ServiceImpl<TpMainDao, TpMainEntity> implements TpMainService {

    final TpMainDao tpMainDao;
    final HtmlsignatureService htmlsignatureService;

    @Override
    public TpMainEntity findByAppontMainId(String mainId) {
        return tpMainDao.findByAppontMainId(mainId);
    }

    @Override
    public List<ReportCashierVo> findReportCashier() {
        return tpMainDao.findReportCashier();
    }

    @Override
    public List<ExpenseForMoney> findByMoney(String moneyTypeCode, String projectCode, String cateCode) {
        return tpMainDao.findByMoney(moneyTypeCode, projectCode, cateCode);
    }

    @Override
    public TaskVo findTaskInfo(String taskId) {
        return tpMainDao.findTaskInfo(taskId);
    }

    @Override
    public List<TaskVo> findTaskInfos(List<String> taskIds) {
        return tpMainDao.findTaskInfos(taskIds);
    }


}